package jp.seraph.jsade.perceptor;

import java.util.HashMap;
import java.util.Map;

import jp.seraph.jsade.message.MessageUtil;

public class GameState {
    private GameState(String aName){
        mName = aName;
        GAME_STATE_MAP.put(aName, this);
    }

    private String mName;

    private static Map<String, GameState> GAME_STATE_MAP = new HashMap<String, GameState>();

    public static GameState getState(String aName){
        GameState tResult = GAME_STATE_MAP.get(aName);
        if(tResult == null)
            throw new IllegalArgumentException(MessageUtil.enumValueNotFound("GameState" , aName));

        return tResult;
    }

    public String getName(){
        return mName;
    }

    public static GameState BEFORE_KICK_OFF = new GameState("BeforeKickOff");
    public static GameState KICK_OFF_LEFT = new GameState("KickOff_Left");
    public static GameState KICK_OFF_RIGHT = new GameState("KickOff_Right");
    public static GameState PLAY_ON = new GameState("PlayOn");
    public static GameState KICK_IN_LEFT = new GameState("KickIn_Left");
    public static GameState KICK_IN_RIGHT = new GameState("KickIn_Right");
    public static GameState CORNER_KICK_LEFT = new GameState("corner_kick_left");
    public static GameState CORNER_KICK_RIGHT = new GameState("corner_kick_right");
    public static GameState GOAL_KICK_LEFT = new GameState("goal_kick_left");
    public static GameState GOAL_KICK_RIGHT = new GameState("goal_kick_right");
    public static GameState OFFSIDE_LEFT = new GameState("offside_left");
    public static GameState OFFSIDE_RIGHT = new GameState("offside_right");
    public static GameState GAME_OVER = new GameState("GameOver");
    public static GameState GOAL_LEFT = new GameState("Goal_Left");
    public static GameState GOAL_RIGHT = new GameState("Goal_Right");
    public static GameState FREE_KICK_LEFT = new GameState("free_kick_left");
    public static GameState FREE_KIGHT = new GameState("free_kick_right");
    public static GameState UNKNOWN = new GameState("unknown");
}
